package java_DesignPattern.BehavioralPattern.StrategyPattern;

/**
 * 策略模式---测试类
 */
public class Test {

    public static void main(String[] args) {

        SystemContext systemContext = new SystemContext(new StrategyB());

        //切换策略
        systemContext.setStrategy(new StrategyC());

        systemContext.doStrategy();
    }
}
